/*
Copyright 2010,2011 Matt Van Der Westhuizen

This file is part of CGLL.

CGLL is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

CGLL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with CGLL.  If not, see <http://www.gnu.org/licenses/>.
*/

package org.chaoticengine.cgll.input;

import java.util.ArrayList;
import java.util.List;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Root;

/**
 * Input configuration binds textual command strings like "LEFT", "SHOOT", etc.
 * to actual input device key presses.
 *
 * @author Matt Van Der Westhuizen <mattpwest@gmail.com>
 */
@Root(name="input")
public class InputConfiguration {
    /**
     * Name of the configuration - useful for allowing switching between
     * different input profiles.
     */
    protected String name = "";

    /** List of input bindings. */
    protected List<Binding> bindings = new ArrayList<Binding>();

    public InputConfiguration() {}

    @ElementList(name="bindings", entry="binding", inline=true)
    public List<Binding> getBindings() {
        return bindings;
    }

    @ElementList(name="bindings", entry="binding", inline=true)
    public void setBindings(List<Binding> bindings) {
        this.bindings = bindings;
    }

    @Element(name="name")
    public String getName() {
        return name;
    }

    @Element(name="name")
    public void setName(String name) {
        this.name = name;
    }


}
